package com.heatup.apt.common.constants;

import com.heatup.apt.common.util.StringUtil;

import java.math.*;

public class ServiceConstans {

	
	/**
	 * VIP
	 */
	public static final String is_vip = "2";
	/**
	 * 系统默认餐券兑换价格
	 */
	public static final BigDecimal defaultMealCouponPrice = new BigDecimal(50);

	public static final BigDecimal defaultPtCoursePrice = new BigDecimal(500);
	
	
	public enum ServiceType {
		teamCourse(1,"1","团课"),
		privateCourse(2,"2","私教课"),
		campCourse(3,"3","檬营"),
		selfFitness(4,"4","自助健身"),
		vip(5,"5","会员"),
		cashCardServie(6,"6","储值卡充值"),
		teamMonthlyService(7,"7","包月卡"),
		goodsInfoService(8,"8","商品订单"),
		physicalCoupon(9,"9","体测"),
		privatePhysical(10,"10","私教体验"),
		privateBespeak(11,"11","预约私教"),
		mealService(12,"12","订单服务"),
		mealCouponService(13,"13","餐券");
		
		private int index;
		private String type;
		private String title;
		
		ServiceType(int index,String type,String title){
			this.index = index;
			this.type = type;
			this.title = title;
	    }
		
		public static ServiceType getServiceType(String type){
			if(StringUtil.isEmpty(type))
				return null;
			for(ServiceType value :ServiceType.values()){
				if(StringUtil.isEquals(value.getType(), type)){
					return value;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}

		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}

		public String getType() {
			return type;
		}

		public void setType(String type) {
			this.type = type;
		}
	}
}
